extern crate serde;
extern crate serde_json;

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct Room{
    pub id:i32,
    pub room_name:String,
    pub room_desc:String,
    pub admin_uuid:String,
    pub table_num:i32,
    pub admin_name:String,
    pub member_num:i64,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct RoomListData{
    pub cur_page:i32,
    pub datas:Option<Vec<Room>>,
    pub offset:i64,
    pub over:bool,
    pub page_count:i32,
    pub size:i32,
    pub total:i32,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct RoomPageData{
    pub data:RoomListData,
    pub error_code:i32,
    pub error_msg:String,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct RoomKey{
    pub id:i32,
    pub room_name:String,
    pub room_desc:String,
    pub admin_uuid:String,
    pub table_num:i32,
    pub admin_name:String,
    pub member_num:i64,
    pub my_room_num:i32,
    pub my_copper_cash:i64,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct RoomKeyData{
    pub data:Option<RoomKey>,
    pub error_code:i32,
    pub error_msg:String,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct RoomData{
    pub data:Option<Room>,
    pub error_code:i32,
    pub error_msg:String,
}